/**
 * 
 */
package sk.lukaskrupa.guess.the.color.utils;

import sk.lukaskrupa.guess.the.color.core.ColorEnum;
import android.util.SparseArray;

/**
 * Contains utility methods. - like determine correct resid for color
 * 
 * @author lukas.krupa
 * 
 */
public class GuessColorUtil {

	/**
	 * Prints SparseArray as Array.
	 * 
	 * @param listToPrint
	 *            to be print
	 * @return String representation of SparseArray as Array do this
	 */
	public static String printSparseArray(SparseArray<ColorEnum> listToPrint) {
		StringBuilder result = new StringBuilder("[");

		result.append("" + listToPrint.get(1));
		for (int index = 2; index <= listToPrint.size(); index++) {

			result.append(", " + listToPrint.get(index));
		}

		result.append("]");

		return result.toString();
	}
}
